package com.qf.co.service;

import com.qf.co.Dao.ProfileDao;
import com.qf.co.Dao.ProfileDaoImpl;
import com.qf.co.pojo.Profile;

import java.util.List;

/**
 * @author hanjiejie
 * @version V1.0
 * @Project java2203
 * @Package com.qf.co.service
 * @Description:
 * @Date 2022/5/28 22:09
 */
public class ProfileServiceImpl implements  ProfileService{
    @Override
    public List<Profile> findProfile() {
        ProfileDao profileDao = new ProfileDaoImpl();
        List<Profile> list = profileDao.findAll();
        return list;
    }

    @Override
    public Profile allone(String id) {
        ProfileDao profileDao = new ProfileDaoImpl();
        Profile profile = profileDao.allone(id);

       return profile;
    }

    @Override
    public Boolean update(Profile profile) {
        ProfileDao profileDao = new ProfileDaoImpl();
        int count = profileDao.update(profile);
        if (count>0){
           return true;
        }
        return false;
    }
}
